package com.hm.hsw2;



public class StringHandlerDemo {
    public static void main(String[] args) {
   useStringHandler(new StringHandler() {
            @Override
            public void printMessage(String s) {
                System.out.println(s);
            }
        });
   useStringHandler(s -> System.out.println(s));

    }
    public static void useStringHandler(StringHandler stringHandler){
        String s="花开花落";
        stringHandler.printMessage(s);

    }
}
